package com.panshi.controller;

import com.panshi.pojo.Slideshow;
import com.panshi.service.impl.SlideshowServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class SildeshowController {

    @Autowired
    SlideshowServiceImpl slideshowService;

    @RequestMapping("slideshow")
    public String querySlist(Model model) {
        List<Slideshow> slideshows = slideshowService.queryList();
        System.out.println(slideshows);
        model.addAttribute("slideshows", slideshows);
        return "/emp/slideshow";
    }
}
